﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace RingSong.ViewModels
{
    public class RingViewModel : INotifyPropertyChanged
    {
        private string _infoid;
        public string Infoid
        {
            get { return _infoid; }
            set
            {
                if (value != _infoid)
                {
                    _infoid = value;
                    NotifyPropertyChanged("Infoid");
                }
            }
        }

        private string _title;
        public string Title
        {
            get { return _title; }
            set
            {
                if (value != _title)
                {
                    _title = value;
                    NotifyPropertyChanged("Title");
                }
            }
        }

        private string _totaldown;
        public string Totaldown
        {
            get { return _totaldown; }
            set
            {
                if (value != _totaldown)
                {
                    _totaldown = value;
                    NotifyPropertyChanged("Totaldown");
                }
            }
        }

        private string _downurl;
        public string Downurl
        {
            get { return _downurl; }
            set
            {
                if (value != _downurl)
                {
                    _downurl = value;
                    NotifyPropertyChanged("Downurl");
                }
            }
        }

        private string _tag;
        public string Tag
        {
            get { return _tag; }
            set {
                if (value != _tag)
                {
                    _tag = value;
                    NotifyPropertyChanged("Tag");
                }
            }
        }

        private double _progress;
        public double Progress
        {
            get { return _progress; }
            set
            {
                if (value != _progress)
                {
                    _progress = value;
                    NotifyPropertyChanged("Progress");
                }
            }
        }

        private string _singer;

        public string Singer
        {
            get { return _singer; }
            set
            {
                if (value != _singer)
                {
                    _singer = value;
                    NotifyPropertyChanged("Singer");
                }
            }
        }

        //private Visibility _wait;
        //public Visibility Wait
        //{
        //    get { return _wait; }
        //    set
        //    {
        //        if (value != _wait)
        //        {
        //            _wait = value;
        //            NotifyPropertyChanged("Wait");
        //        }
        //    }
        //}

        //private Visibility _btns;
        //public Visibility Btns
        //{
        //    get { return _btns; }
        //    set
        //    {
        //        if (value != _btns)
        //        {
        //            _btns = value;
        //            NotifyPropertyChanged("Btns");
        //        }
        //    }
        //}

        //private Visibility _pro;
        //public Visibility Pro
        //{
        //    get { return _pro; }
        //    set
        //    {
        //        if (value != _pro)
        //        {
        //            _pro = value;
        //            NotifyPropertyChanged("Pro");
        //        }
        //    }
        //}


        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
